#ifndef _socks_h
#define _socks_h

#include <stdio.h>
#include <stdlib.h>

#include <winsock2.h>
#include <Ws2tcpip.h>

#include <string.h>
#include <process.h>

#include <string.h>

#include "http.h"
#include "types.h"

/*
 * initSocket()
 * ----------------------
 * Creates a new mastersocket from which the server can listen for incoming TCP
 */
SOCKET initSocket(char *port);

/*
 * getClientSocket()
 * -------------------------
 * Creates a new socket for communicating with one client
 */
SOCKET getClientSocket(SOCKET clientsocket);

void socketHTTPReader(SOCKET sock, char *msgbuffer);

void clientThread(void *msockp);

void sendData(int socket, httprequestp request, httpresponsep response);

#endif